var com = {};

(function (NS, $, undefined ) {

	/* Main Application Initializer
		block
    */
	NS.SPApp = Ember.Application.create({LOG_TRANSITIONS: true});
    
    /* 
    Main Application Controller
     */
    NS.SPApp.ApplicationController = Ember.Controller.extend({
	   firstName: "firstName",
       lastName: "lastName Variable from ApplicationController"
   
    });
    
    /* 
    Another Custom URI handlers
     */
    NS.SPApp.Router.map(function() {
      this.route("products", { path: "/products" });
      this.route("articles", { path: "/articles" });
    });
    
	NS.SPApp.BaseRoute = Ember.Route.extend({
	  enter: function(router) {
		console.log('enter ----> Base router..');
	  } 
	});
	
	NS.SPApp.IndexRoute = NS.SPApp.BaseRoute.extend({
	  setupController: function(controller) {
		// Set the IndexController's `title`
		console.log('index router..');
	  },
	renderTemplate: function() {
			this.render('header',{ outlet: 'commonheader' , controller: 'commonHeader'});
			//this.render('footer',{ outlet: 'commonfooter' , controller: 'commonFooter'});
			this.render('topnav',{ outlet: 'topnav' , controller: 'topNavigation'});
			this.render('sidenav',{ outlet: 'sidenav' , controller: 'sideNavigation'});
			this.render('contentbody',{ outlet: 'contentbody' , controller: 'contentBody'});			
		}  	  
	});
   
    })(com.ui = com.ui || {},jQuery);